Make it possible to link to Special:Ipblocklist/<ip> instead of just Special:Ipblockl...
authorTobias <churchofemacs@users.mediawiki.org>
Sun, 1 Nov 2009 20:01:34 +0000 (20:01 +0000)
committerTobias <churchofemacs@users.mediawiki.org>
Sun, 1 Nov 2009 20:01:34 +0000 (20:01 +0000)
includes/specials/SpecialIpblocklist.php

index 701df09..06dd570 100644 (file)
@@ -5,12 +5,13 @@
  */
 
 /**
+ * @param $ip part of title: Special:Ipblocklist/<ip>.
  * @todo document
  */
-function wfSpecialIpblocklist() {
+function wfSpecialIpblocklist( $ip = '' ) {
        global $wgUser, $wgOut, $wgRequest;
-
-       $ip = trim( $wgRequest->getVal( 'wpUnblockAddress', $wgRequest->getVal( 'ip' ) ) );
+       $ip = $wgRequest->getVal( 'ip', $ip );
+       $ip = trim( $wgRequest->getVal( 'wpUnblockAddress', $ip ) );
        $id = $wgRequest->getVal( 'id' );
        $reason = $wgRequest->getText( 'wpUnblockReason' );
        $action = $wgRequest->getText( 'action' );